using WPS.Libraries.CssDom;

/*
    CssDom Library
    Copyright (C) 2007-2011  Ferenc Veres

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with this library; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */

namespace WPS.Modules.StyleLibrary
{
	/// <summary>
	/// Data class for one search criteria and result for finding CSSRule in a CSSStyleSheet.
	/// </summary>
	public class StyleRuleSearch
	{
		/// <summary>
		/// Input value for search: Searching will find this selector.
		/// </summary>
		public string SelectorText
		{
			get { return m_SelectorText; }
			set { m_SelectorText = value; }
		}
		private string m_SelectorText;

		/// <summary>
		/// Search result sets this. Pointer to the found style rule in the CSSStyleSheet matching SelectorText.
		/// </summary>
		public CSSStyleRule Rule
		{
			get { return m_Rule; }
			set { m_Rule = value; }
		}
		private CSSStyleRule m_Rule;

		/// <summary>
		/// Search result sets this: Index of the found Rule syle rule in the CSSStlyeSheet.
		/// </summary>
		public int RuleIndex
		{
			get { return m_RuleIndex; }
			set { m_RuleIndex = value; }
		}
		private int m_RuleIndex;

		/// <summary>
		/// Creates an empty data object for specifing style rule search criterias for StyleSheetManager.SearchStyleRules().
		/// </summary>
		public StyleRuleSearch()
		{
		}

		/// <summary>
		/// Creates a data object for specifing style rule search criterias for StyleSheetManager.SearchStyleRules().
		/// </summary>
		/// <param name="selectorText">Specifies what selector text should be searched.</param>
		public StyleRuleSearch(string selectorText)
		{
			this.SelectorText = selectorText;
		}
	}
}